package com.itheima.service.impl;

import com.itheima.dao.UserDao;
import com.itheima.entity.User;
import com.itheima.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserDao userDao;
    /**
     * 用户登录功能
     *
     * @param username 用户名
     * @param password 密码
     * @return 登录成功返回user对象
     */
    @Override
    public User login(String username, String password) {
        return userDao.findUser(username,password);
    }
}
